﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Where
{
    internal class Program
    {
        static void Main(string[] args)
        {
            var nums = new int[] { 1, 5, 6, 6, 3, 3 };
            IEnumerable<int> ints = Mywhere(nums, a => a > 1);
            foreach (int i in ints)
            {
                Console.WriteLine(i);

            }
            Console.ReadLine();

        }


        static IEnumerable<int> Mywhere(IEnumerable<int> items, Func<int, bool> f)
        {
            List<int> result = new List<int>();
            foreach (var item in result)
            {
                if (f(item) == true)
                {
                    result.Add(item);
                }
            }
            return result;
        }
    }
}
